<template>
  <div class="person">
    <h2>{{ name }}</h2>
    <h2>{{ age }}</h2>
  </div>
</template>

<!-- 这种写法代替了setup函数，且无须手动返回页面便能读取到 -->
<script lang="ts" setup name="Person1">
    let name="沐玖"
    let age=18
    let tel="13899999999"

    function changeAge(){
        age++
    }

    function changeName(){
        name="沐玖"
    }
    function showTel(){
        alert(tel)
    }
</script>

<style scoped>
.person{
    background-color: #8eace8;
    box-shadow: 0 0 10px;
    border-radius: 10px;
}
</style>